import request from '../../utils/request';

// 获取列表
export function getList (params){
    return request({
        url:'/sys/iaCommodityClassify/getCommodityClassifyTree.do',
        method: 'get',
        params: params
    });
};


// 新增商品分类
export function addCommodityClassify(params){
    return request({
        url:'/sys/iaCommodityClassify/add.do',
        method: 'post',
        data: params,
        headContype:true
    });
};


// 编辑商品分类
export function editCommodityClassify(params){
    return request({
        url:'/sys/iaCommodityClassify/update.do',
        method: 'put',
        data: params,
        headContype:true
    });
};




// 删除一条商品分类 
export function delCommodityClassify(params){
    return request({
        url:'/sys/iaCommodityClassify/del.do',
        method: 'DELETE',
        params: params
    });
};



// 查看商品分类 编辑详情
export function lookCommodityClassifyDetail (params){
    return request({
        url:'/sys/iaCommodityClassify/getDetail.do',
        method: 'get',
        params: params
    });
};





// 获取帐号列表数据
export function getAccountList (params){
    return request({
    url:'/sys/user/findUserListByPage.do',
        method: 'post',
        data: params,
        headContype:true
    });
};
// 查看菜单编辑详情
export function lookAccountDetail (params){
    return request({
        url:'/sys/user/getUser.do',
        method: 'get',
        params: params
    });
};

// 单个删除帐号列表
export function siginDelAcount (params){
    return request({
        url:'/sys/user/delete.do',
        method: 'DELETE',
        params: params
    });
};


//编辑菜单按钮
export function editAccount (params){
    return request({
        url:'/sys/user/edit.do',
        method: 'post',
        data: params,
        headContype:true
    });
};


//-公用的产品管理

//农产品管理 列表
export function ncpList (params){
    return request({
        url:'/sys/iaMaterialCorps/findMaterialListByPage.do',
        method: 'get',
        params: params
    });
};

export function ncpAuditList (params){
    return request({
        url:'/sys/iaMaterialCorps/findMaterialListByPageCheck.do',
        method: 'get',
        params: params
    });
};



//农资产品管理 列表
export function nzList (params){
    return request({
        url:'sys/iaMaterialProducts/findMaterialListByPage.do',
        method: 'get',
        params: params
    });
};

export function nzAuditList (params){
    return request({
        url:'/sys/iaMaterialProducts/findMaterialListByCheckPage.do',
        method: 'get',
        params: params
    });
};


export function nzZuiSuOp (params){
    return request({
        url:'/sys/iaMaterialCorps/operate.do',
        method: 'post',
        data: params,
        headContype:true
    });
};

export function nzGetZuiSuList (params){
    return request({
        url:'/sys/iaMaterialCorps/findOperatePage.do',
        method: 'get',
        params: params
    });
};

//农产品管理 列表删除
export function ncpListDel (params){
    return request({
        url:'/sys/iaMaterialCorps/delete.do',
        method: 'post',
        params: params
    });
};

//农资产品管理 列表删除
export function nzListDel (params){
    return request({
        url:'/sys/iaMaterialCorps/delete.do',
        method: 'post',
        params: params
    });
};


//农产品管理 详情
export function ncpDetails (params){
    return request({
        url:'/sys/iaMaterialCorps/getDetail.do',
        method: 'get',
        params: params
    });
};


//农资产品管理 详情
export function nzDetails (params){
    return request({
        url:'sys/iaMaterialProducts/getDetail.do',
        method: 'get',
        params: params
    });
};



//农产品管理 录入基本信息
export function ncpAddBase(params){
    return request({
        url:'/sys/iaMaterialCorps/addBase.do',
        method: 'post',
        data: params,
        headContype:true
    });
};

//农资产品管理 录入基本信息
export function nzAddBase(params){
    return request({
        url:'sys/iaMaterialProducts/addBase.do',
        method: 'post',
        data: params,
        headContype:true
    });
};

//农产品管理 修改基本信息
export function ncpUpdateBase(params){
    return request({
        url:'/sys/iaMaterialCorps/updateBase.do',
        method: 'put',
        data: params,
        headContype:true
    });
};

//农资产品管理 修改基本信息
export function nzUpdateBase(params){
    return request({
        url:'sys/iaMaterialProducts/updateBase.do',
        method: 'put',
        data: params,
        headContype:true
    });
};

// -- 规格设置
//农产品管理 录入规格设置
export function ncpAddStand(params){
    return request({
        url:'/sys/iaMaterialCorps/addStand.do',
        method: 'post',
        data: params,
        headContype:true
    });
};

//农产品管理 更改规格设置
export function ncpUpdateStand(params){
    return request({
        url:'/sys/iaMaterialCorps/updateStand.do',
        method: 'put',
        data: params,
        headContype:true
    });
};

//农产品管理 获取规格列表
export function ncpGetStandList(params){
    return request({
        url:'/sys/iaMaterialCorps/getStandList.do',
        method: 'get',
        params: params
    });
};

//农产品管理 规格列表删除
export function ncpStandListDel(params){
    return request({
        url:'/sys/iaMaterialCorps/delStand.do',
        method: 'DELETE',
        params: params
    });
};


// -- 参数设置
//农产品管理 录入参数设置
export function ncpAddParam(params){
    return request({
        url:'/sys/iaMaterialCorps/addParam.do',
        method: 'post',
        data: params,
        headContype:true
    });
};
export function nzAddParam(params){
    return request({
        url:'sys/iaMaterialProducts/addParam.do',
        method: 'post',
        data: params,
        headContype:true
    });
};

//农产品管理 更改参数设置
export function ncpUpdateParam(params){
    return request({
        url:'/sys/iaMaterialCorps/updateParam.do',
        method: 'put',
        data: params,
        headContype:true
    });
};

export function nzUpdateParam(params){
    return request({
        url:'sys/iaMaterialProducts/updateParam.do',
        method: 'put',
        data: params,
        headContype:true
    });
};

//农产品管理 获取参数列表
export function ncpGetParamList(params){
    return request({
        url:'/sys/iaMaterialCorps/getParamList.do',
        method: 'get',
        params: params
    });
};
export function nzGetParamList(params){
    return request({
        url:'/sys/iaMaterialCorps/getParamList.do',
        method: 'get',
        params: params
    });
};


//农产品管理 参数列表删除
export function ncpParamListtDel(params){
    return request({
        url:'/sys/iaMaterialCorps/delParam.do',
        method: 'DELETE',
        params: params
    });
};

export function nzParamListtDel(params){
    return request({
        url:'sys/iaMaterialProducts/delParam.do',
        method: 'DELETE',
        params: params
    });
};

// -- 检查报告
//农产品管理 录入检查报告
export function ncpAddOperateExamReport(params){
    return request({
        url:'/sys/iaMaterialCorps/operateExamReport.do',
        method: 'post',
        data: params,
        headContype:true
    });
};
export function nzAddOperateExamReport(params){
    return request({
        url:'sys/iaMaterialProducts/operateExamReport.do',
        method: 'post',
        data: params,
        headContype:true
    });
};

//农产品管理 更改检查报告
export function ncpUpdateOperateExamReport(params){
    return request({
        url:'/sys/iaMaterialCorps/operateExamReport.do',
        method: 'post',
        data: params,
        headContype:true
    });
};

export function nzUpdateOperateExamReport(params){
    return request({
        url:'sys/iaMaterialProducts/operateExamReport.do',
        method: 'post',
        data: params,
        headContype:true
    });
};


//-公用的产品管理审批
// 审核
export function ncpSaveAudit (params){
    return request({
        url:"/sys/iaMaterialCorps/check.do",
        method: 'post',
        params: params
    });
};

export function nzSaveAudit (params){
    return request({
        url:"sys/iaMaterialProducts/check.do",
        method: 'post',
        params: params
    });
};

